<template>



</template>

<script setup>
import {onMounted, ref} from "vue";
import axios from "axios";
import {ElMessage} from "element-plus";
import qs from "qs";
import router from "@/router";

/*const provinceId = new URLSearchParams(window.location.search).get('provinceId');
const cityId = new URLSearchParams(window.location.search).get('cityId');*/

const params = new URLSearchParams(window.location.search);
const provinceId = params.get('provinceId');
const cityId = params.get('cityId');

const travelDetailQuery = ref({
  provinceId:provinceId,
  cityId:cityId
});

//保存旅行社信息
const travelDetailArr = ref([])
//查找旅行社信息
const searchTravelDetail = () => {
  let data = qs.stringify(travelDetailQuery.value);

  console.log(travelDetailQuery.value)
  axios.get(BASE_URL+'/travelagent/searchTravelDetail?'+data)
      .then((response)=>{
        if(response.data.code===2000){
          travelDetailArr.value = response.data.data;
          console.log(travelDetailArr);
        }else{
          ElMessage.error(response.data.msg);
        }
      })
}

onMounted(()=>{
  searchTravelDetail();
})

const localShanXiTourismArr = ref([
  {
    title: "山西五台山",
    info: "山西五台山·2日1晚跟团游·【万人之选 佛韵禅音 祈福专线】【一价全含】 赠10公里之内上门接+40元景区小交通+(安排景区内酒店) 五爷庙+拜五方文殊+姻缘梵仙山 优先安排金牌导游无损退款】",
    url: "/travelAgent/index/travel1.jpg",
    price: "￥160起"
  },
  {
    title: "山西平遥",
    info: "山西平遥·2日1晚跟团【特色客栈体验+首道门票全含+含壶口景交+可选旅拍套餐】【真纯玩团】【古城半天自由活动】 逛两院踏寻晋商足迹· 留古城赏夜景美色；",
    url: "/travelAgent/index/travel2.jpg",
    price: "￥168起"
  },
  {
    title: "山西王家大院",
    info: "山西王家大院·2日1晚跟团游【金秋国庆4人立减200元】参观一城（平遥古城自由活动-可自行旅拍穿越晋商少奶奶）+双院（王/乔家）+一瀑布（黄河壶口）|含壶口景交赠王家耳麦|宿特色客栈",
    info1: "随心组合",
    url: "/travelAgent/index/travel3.jpg",
    price: "￥170起"
  },{
    title: "山西大同",
    info: "山西大同·2日1晚跟团游（游悟空同款）【晋北深度游+一车一导+宿古都大同舒适酒店+已含云冈石窟景区小交通】",
    url: "/travelAgent/index/travel4.jpg",
    price: "￥160起"
  },{
    title: "定制旅游",
    info: "出行省心·玩得尽兴",
    url: "/travelAgent/index/travel4.jpg",
    price: "￥160起"
  },{
    title: "跟团游",
    info: "省钱省心·一站打包",
    url: "/travelAgent/index/travel1.jpg",
    price: "￥160起"
  },
  {
    title: "私家游",
    info: "独立出行·行程可调",
    url: "/travelAgent/index/travel2.jpg",
    price: "￥160起"
  },
  {
    title: "自由行",
    info: "交通·酒店·景点",
    info1: "随心组合",
    url: "/travelAgent/index/travel3.jpg",
    price: "￥160起"
  },{
    title: "定制旅游",
    info: "出行省心·玩得尽兴",
    url: "/travelAgent/index/travel4.jpg",
    price: "￥160起"
  },{
    title: "定制旅游",
    info: "出行省心·玩得尽兴",
    url: "/travelAgent/index/travel4.jpg",
    price: "￥160起"
  }
]);

</script>


<style scoped>

</style>